package cn.iocoder.yudao.hires.mapper;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.hires.entity.NoticeReviewDO;
import cn.iocoder.yudao.hires.vo.noticereview.NoticeReviewPageReqVO;
import org.apache.ibatis.annotations.Mapper;

/**
 * 下游-面试评价 Mapper
 *
 * @author 超级管理员
 */
@Mapper
public interface NoticeReviewMapper extends BaseMapperX<NoticeReviewDO> {

    default PageResult<NoticeReviewDO> selectPage(NoticeReviewPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<NoticeReviewDO>().eqIfPresent(NoticeReviewDO::getUserId, reqVO.getUserId()).likeIfPresent(NoticeReviewDO::getCompanyName, reqVO.getCompanyName()).eqIfPresent(NoticeReviewDO::getPositionId, reqVO.getPositionId()).likeIfPresent(NoticeReviewDO::getPositionName, reqVO.getPositionName()).eqIfPresent(NoticeReviewDO::getReviewType, reqVO.getReviewType()).eqIfPresent(NoticeReviewDO::getScore, reqVO.getScore()).eqIfPresent(NoticeReviewDO::getEnvironmentScore, reqVO.getEnvironmentScore()).eqIfPresent(NoticeReviewDO::getTreatmentScore, reqVO.getTreatmentScore()).eqIfPresent(NoticeReviewDO::getCultureScore, reqVO.getCultureScore()).eqIfPresent(NoticeReviewDO::getDevelopmentScore, reqVO.getDevelopmentScore()).eqIfPresent(NoticeReviewDO::getContent, reqVO.getContent()).eqIfPresent(NoticeReviewDO::getIsAnonymous, reqVO.getIsAnonymous()).eqIfPresent(NoticeReviewDO::getStatus, reqVO.getStatus()).eqIfPresent(NoticeReviewDO::getTags, reqVO.getTags()).betweenIfPresent(NoticeReviewDO::getCreateTime, reqVO.getCreateTime()).orderByDesc(NoticeReviewDO::getId));
    }

}